{% extends "base_restau.html" %}
{% load dajaxice_templatetags %}
{% load i18n %}

	{% block header %}
		{% dajaxice_js_import %}
		<script type="text/javascript" src="{{STATIC_URL}}javascript/jquery.js"></script>
		<script type="text/javascript" src="{{STATIC_URL}}javascript/display_stars.js"></script>
		<link rel="stylesheet" media="screen" type="text/css" title="Essai" href="{{STATIC_URL}}css/stars.css" />
		<script type="text/javascript">
		    var invit_id = {{ invit_id }}
		    function callback() {
    			$('#rappel').html('Rappel envoyé');
			}
			$(function() {
    			$('span.stars').stars();
			});
		</script>
	{% endblock %}
	
	{% block titre %}{% trans "Tableau de bord" %}{% endblock %}
	
	{% block menu %}	
		<ul id="navigation">
			<li> <img src="{{STATIC_URL}}images/26.png" alt=""/>{% trans "Civilité" %}</li>
			<li> <img src="{{STATIC_URL}}images/27.png" alt=""/>{% trans "Invités" %}</li>
			<li> <img src="{{STATIC_URL}}images/28.png" alt=""/>{% trans "Goûts" %}</li>
			<li> <img src="{{STATIC_URL}}images/24.png" alt=""/>{% trans "Réponse" %}</li>
			<li> <img src="{{STATIC_URL}}images/30.png" alt=""/>{% trans "Résultat" %}</li>
		</ul>
	{% endblock %}
	
	{% block content %}
		<br><br>
		<h3>{% trans "Vos choix" %} (<a href='{{ lien }}'>{% trans "recommencer le sondage"%}</a>) :</h3>
		{% for rep in rep_list %}
			<p>{{ rep.0 }} <span class="stars">{{ rep.1 }}}</span></p>
		{% endfor %}
        <h4>{% trans "Invités ayant répondu"%} :</h4>
        {% for invite in invites_list %}
            {% if invite.presence %}
            <p>{{ invite.email }}</p>
            {% endif %}
        {% endfor %}
        <h4>{% trans "Invités n'ayant pas encore répondu" %} :</h4>
        {% for invite in invites_list %}
            {% if not invite.presence %}
			<p>{{ invite.email }}<button name='{{ invite.email }}' id="rappel" type="button" value="Rappel" onclick="this.disabled=true; Dajaxice.EssaiAVA.ava.rappel_restaurant(callback, {'email': this.name, 'invit_id': invit_id})">{% trans "Rappel" %}</button></p>
            {% endif %}
        {% endfor %}
		<form action="" method="POST">
        {% csrf_token %}
        <caption ALIGN=bottom><input type=submit class=submit value=Cloture></caption>
        </form>
    {% endblock %}
        